package com.job.netease;

import java.util.Scanner;

/**
 * @ClassName: test.Netease2_1
 * @Description:
 * @Author: 12071
 * @Date: 2022/4/21 19:03
 */
public class Netease2_1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        // 1行
        System.out.print("*");
        for (int j = 0; j < n - 2; j++) {
            System.out.print(" ");
        }
        for (int j = 0; j < n; j++) {
            System.out.print("*");
        }
        System.out.println();
        // 2- n-1
        for (int i = 1; i < n - 1; i++) { // 2- n-1行
            System.out.print("*");
            for (int j = 0; j < i-1; j++) {
                System.out.print(" ");
            }
            System.out.print("*");
            for (int j = 0; j < n-2-i; j++) {
                System.out.print(" ");
            }
            System.out.print("*");
            for (int j = 0; j < n-2-i; j++) {
                System.out.print(" ");
            }
            System.out.print("*");
            System.out.println();
        }
        // n 行
        for (int i = 0; i < 2 * n - 1; i++) { // n行
            System.out.print("*");
        }
        System.out.println();
        for (int i = 0; i < n - 2; i++) { // n+1 - 2n-1
            for (int j = 0; j < n-i-2; j++) {
                System.out.print(" ");
            }
            System.out.print("*");
            for (int j = 0; j < i; j++) {
                System.out.print(" ");
            }
            System.out.print("*");
            for (int j = 0; j < i; j++) {
                System.out.print(" ");
            }
            System.out.print("*");
            for (int j = 0; j < n-i-3; j++) {
                System.out.print(" ");
            }
            System.out.println("*");
        }
        // 最后1行
        for (int j = 0; j < n; j++) {
            System.out.print("*");
        }
        for (int j = 0; j < n-2; j++) {
            System.out.print(" ");
        }
        System.out.println("*");
    }
}
